[PATCH] gnu: Add gnunet-scheme

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Submitted by
Maxime Devos
Severity
normal
M
M
Maxime Devos wrote on 4 Feb 2022 12:47
(address . guix-patches@gnu.org)
33b610635cb8cf1edab0cd0efa285c078216fd03.camel@telenet.be
X-Debbugs-CC: pukkamustard <pukkamustard@posteo.net>, pukkamustard <pukkamustard@posteo.net>

[CC'ing pukkamustard and ludo for their interest in Guix+GNUnet]

Hi,

The first patch adds a module to guile-fibers required by gnunet-scheme. It has been submitted upstream at https://github.com/wingo/fibers/pull/50, but there has not been any response so far.

The second commit adds 'gnunet-scheme', which is not the same as guile-gnunet:

"This package provides Guile modules for connecting to the NSE (network
size estimation) and DHT (distributed hash table) services of GNUnet. It also
has infrastructure for writing new GNUnet services and connecting to them and
can be used from multi-threaded environments. It is not to be confused with
@code{guile-gnunet} -- @code{guile-gnunet} supports a different set of services."

gnunet-scheme supports the DHT and NSE, while guile-gnunet doesn't.
Conversely, guile-gnunet supports FS while gnunet-scheme doesn't (yet).
Additionally, while it's not impossible per se, guile-gnunet is hard
to use from a multi-threaded context.

Next step: integrate it with guile-eris and the substituter patches based
on guile-eris (currently these only support IPFS as P2P backend)!

'guix lint gnunet-scheme guile-fibers' only have a single complaint:

gnu/packages/gnunet.scm:379:12: gnunet-scheme@0.2: URI https://git.gnunet.org/git/gnunet-scheme.gitnot reachable: 404 ("Not Found")

"guix build gnunet-scheme" could download the source code though,
so I don't understand.

It fails to cross-compile because guile-fibers fails to cross-compile:

Toggle quote (8 lines)
> checking for guile-3.0... yes
> checking for guile-3.0... no
> checking for guile3.0... no
> checking for guile-3... no
> checking for guile3... no
> checking for guile... no
> configure: error: guile required but not found

That's unrelated to gnunet-scheme though.

Greetings,
Maxime
From 5b57cdbb8f4d56c66885ea029cbe0a185d61a725 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Fri, 4 Feb 2022 11:23:36 +0000
Subject: [PATCH 2/2] gnu: Add gnunet-scheme.

This is not the same as guile-gnunet, see the description.

* gnu/packages/gnunet.scm (gnunet-scheme): New variable.
---
gnu/packages/gnunet.scm | 58 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)

Toggle diff (96 lines)
diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm
index 5c0dd348cc..1c09c9047b 100644
--- a/gnu/packages/gnunet.scm
+++ b/gnu/packages/gnunet.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -42,6 +43,7 @@ (define-module (gnu packages gnunet)
#:use-module (gnu packages groff)
#:use-module (gnu packages gtk)
#:use-module (gnu packages guile)
+ #:use-module (gnu packages guile-xyz)
#:use-module (gnu packages gstreamer)
#:use-module (gnu packages libidn)
#:use-module (gnu packages linux)
@@ -58,10 +60,12 @@ (define-module (gnu packages gnunet)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages sqlite)
+ #:use-module (gnu packages text-editors)
#:use-module (gnu packages tls)
#:use-module (gnu packages upnp)
#:use-module (gnu packages video)
#:use-module (gnu packages vim)
+ #:use-module (gnu packages xorg)
#:use-module (gnu packages web)
#:use-module (gnu packages xiph)
#:use-module (gnu packages backup)
@@ -368,6 +372,60 @@ (define-public guile-gnunet ;GSoC 2015!
(home-page "https://gnu.org/software/guix")
(license license:gpl3+))))
+(define-public gnunet-scheme
+ (package
+ (name "gnunet-scheme")
+ (version "0.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.gnunet.org/git/gnunet-scheme.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0a11n58m346vs2khns2hfnxv8lbscf8aaqzhmq0d7nwdpn808nrp"))
+ (modules '((guix build utils)))
+ ;; XXX: Work-around
+ ;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49623>,
+ ;; this can be removed once Guile > 3.0.7 is released.
+ (snippet '(substitute* '("gnu/gnunet/config/parser.scm"
+ "tests/config-parser.scm")
+ (("#\\{\\$\\{\\}\\}#") "#{${;};}#")
+ (("#\\{\\$\\{:-\\}\\}#") "#{${;:-};}#")
+ (("#\\{\\$\\{\\}\\}# #\\{\\$\\{:-\\}\\}#")
+ "#{$\\x7b;\\x7d;}# #{$\\x7b;:-\\x7d;}#")
+ (("'#\\{\\$\\{\\}\\}# '#\\{\\$\\{:-\\}\\}#")
+ "'#{$\\x7b;\\x7d;}# '#{$\\x7b;:-\\x7d;}#")))))
+ (build-system gnu-build-system)
+ (inputs (list guile-3.0)) ;for pkg-config
+ (propagated-inputs (list guile-bytestructures guile-gcrypt guile-pfds
+ guile-fibers-1.1))
+ (native-inputs (list guile-3.0 ;as a compiler
+ ;; for cross-compilation, the guile inputs need to be
+ ;; native-inputs as well.
+ guile-bytestructures
+ guile-gcrypt
+ guile-pfds
+ guile-fibers-1.1
+ automake
+ autoconf
+ pkg-config
+ texmacs
+ xvfb-run ;for documentation
+ guile-quickcheck)) ;for tests
+ (synopsis "Guile implementation of GNUnet client libraries")
+ (description
+ "This package provides Guile modules for connecting to the NSE (network
+size estimation) and DHT (distributed hash table) services of GNUnet. It also
+has infrastructure for writing new GNUnet services and connecting to them and
+can be used from multi-threaded environments. It is not to be confused with
+@code{guile-gnunet} -- @code{guile-gnunet} supports a different set of services.")
+ ;; Most code is licensed as AGPL and a few modules are licensed as LGPL
+ ;; or GPL. Documentation is licensed as GFDL.
+ (license (list license:agpl3+ license:gpl3+ license:fdl1.3+ license:lgpl3+))
+ (home-page "https://git.gnunet.org/gnunet-scheme.git")))
+
;; FIXME: "gnunet-setup" segfaults under certain conditions and "gnunet-gtk"
;; does not seem to be fully functional. This has been reported upstream:
;; http://lists.gnu.org/archive/html/gnunet-developers/2016-02/msg00004.html
--
2.34.0
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYf0SRRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7jw6AQCjiP7lS93b+VvPxwQmjJIa39KC
24hco7Vi05aBYuFGGwEA9GiUJNuoMavib6VxjpFtvcH07ukJSjtJv1xI030mGgM=
=554y
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 4 Feb 2022 23:40
(name . Maxime Devos)(address . maximedevos@telenet.be)
87wnial0h2.fsf@gnu.org
Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

Toggle quote (2 lines)
> The first patch adds a module to guile-fibers required by gnunet-scheme. It has been submitted upstream at https://github.com/wingo/fibers/pull/50, but there has not been any response so far.

OK.

Toggle quote (13 lines)
> The second commit adds 'gnunet-scheme', which is not the same as guile-gnunet:
>
> "This package provides Guile modules for connecting to the NSE (network
> size estimation) and DHT (distributed hash table) services of GNUnet. It also
> has infrastructure for writing new GNUnet services and connecting to them and
> can be used from multi-threaded environments. It is not to be confused with
> @code{guile-gnunet} -- @code{guile-gnunet} supports a different set of services."
>
> gnunet-scheme supports the DHT and NSE, while guile-gnunet doesn't.
> Conversely, guile-gnunet supports FS while gnunet-scheme doesn't (yet).
> Additionally, while it's not impossible per se, guile-gnunet is hard
> to use from a multi-threaded context.

Interesting.

Toggle quote (3 lines)
> Next step: integrate it with guile-eris and the substituter patches based
> on guile-eris (currently these only support IPFS as P2P backend)!

Yay!

Toggle quote (7 lines)
> 'guix lint gnunet-scheme guile-fibers' only have a single complaint:
>
> gnu/packages/gnunet.scm:379:12: gnunet-scheme@0.2: URI https://git.gnunet.org/git/gnunet-scheme.git not reachable: 404 ("Not Found")
>
> "guix build gnunet-scheme" could download the source code though,
> so I don't understand.

I suppose Git doesn’t attempt to GET /index.html, contrary to the URL
probing code we have.

Toggle quote (13 lines)
> From 8272cceae8642ed89eb3ebc110821a395f3ae087 Mon Sep 17 00:00:00 2001
> From: Maxime Devos <maximedevos@telenet.be>
> Date: Fri, 4 Feb 2022 11:16:46 +0000
> Subject: [PATCH 1/2] gnu: guile-fibers: Add (fibers io-wakeup).
>
> This patch is required by gnunet-scheme. It has been submitted upstream at
> <https://github.com/wingo/fibers/pull/50>, but there has not been any response
> so far.
>
> * gnu/packages/patches/guile-fibers-wait-for-io-readiness.patch: New file.
> * gnu/packages/guile-xyz.scm (guile-fibers-1.1)[source]{patches}: Add it.
> * gnu/local.mk (dist_patch_DATA): Add it.

[...]

Toggle quote (9 lines)
> From 5b57cdbb8f4d56c66885ea029cbe0a185d61a725 Mon Sep 17 00:00:00 2001
> From: Maxime Devos <maximedevos@telenet.be>
> Date: Fri, 4 Feb 2022 11:23:36 +0000
> Subject: [PATCH 2/2] gnu: Add gnunet-scheme.
>
> This is not the same as guile-gnunet, see the description.
>
> * gnu/packages/gnunet.scm (gnunet-scheme): New variable.

Applied both patches, thanks!

Toggle quote (12 lines)
> + ;; XXX: Work-around
> + ;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49623>,
> + ;; this can be removed once Guile > 3.0.7 is released.
> + (snippet '(substitute* '("gnu/gnunet/config/parser.scm"
> + "tests/config-parser.scm")
> + (("#\\{\\$\\{\\}\\}#") "#{${;};}#")
> + (("#\\{\\$\\{:-\\}\\}#") "#{${;:-};}#")
> + (("#\\{\\$\\{\\}\\}# #\\{\\$\\{:-\\}\\}#")
> + "#{$\\x7b;\\x7d;}# #{$\\x7b;:-\\x7d;}#")
> + (("'#\\{\\$\\{\\}\\}# '#\\{\\$\\{:-\\}\\}#")
> + "'#{$\\x7b;\\x7d;}# '#{$\\x7b;:-\\x7d;}#")))))

Wonderful, you deserve a prize for this one. :-)

Toggle quote (2 lines)
> + texmacs

I was surprised by the choice of TeXmacs for documentation—TeXmacs is a
beautiful piece of software, but I find it inconvenient that the manual
is only viewable as PDF, cannot link to other manuals, etc. My 2¢.

(I was also surprised by the use of the (gnu gnunet) name space instead
of just (gnunet), say.)

Anyway, this looks exciting, thank you!

Ludo’.
Closed
M
M
Maxime Devos wrote on 5 Feb 2022 00:18
Re: bug#53775: closed (Re: bug#53775: [PATCH] gnu: Add gnunet-scheme)
(address . 53775@debbugs.gnu.org)(address . ludo@gnu.org)
bf59b579032bce9613f7c2d5ee1bd4ea9c3c214d.camel@telenet.be
GNU bug Tracking System schreef op vr 04-02-2022 om 22:41 [+0000]:
Toggle quote (7 lines)
> > +                         texmacs
>
> I was surprised by the choice of TeXmacs for documentation—TeXmacs is
> a beautiful piece of software, but I find it inconvenient that the
> manual is only viewable as PDF, cannot link to other manuals, etc. 
> My 2¢.

Even with the disadvantages of TeXmacs over TeXinfo (no .info export
so not readable with info readers, no system for cross-references
between manuals except for direct hyperlinking ...), I still prefer
TeXmacs because its editor is just so convenient to use.

FWIW, TeXmacs not only has a PDF export, but also a HTML export:
$ $FAVOURITE_BROWSER $(guix build gnunet-scheme)/share/doc/scheme-gnunet/scheme-gnunet.html

Would be nice if TeXmacs gained some TeXinfo-style cross-referencing macros
and an '.info' export though ...

Toggle quote (3 lines)
> (I was also surprised by the use of the (gnu gnunet) name space
> instead of just (gnunet), say.)

gnunet ...), so does gnunet-scheme.

The convention in Guileland seems to be (gnunet ...) though
(unlike, say, coffeeland where tld.domain.foo.bar is the convention),
so perhaps that will be corrected in a future version.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYf20PBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7s4WAP9ZfS6k799DV8092EJ3rnyIrEGz
OUHKSROnyshiOxAJDgD+JEQUZwGL8DqPspk8qvB8Tu+fBrarbjTKsQPTIaq9DQ4=
=TtgL
-----END PGP SIGNATURE-----


?