all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* GSoC: Binary package distribution through GnuNet (report 2)
@ 2015-06-25 10:44 Rémi Birot-Delrue
  2015-06-25 20:15 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Rémi Birot-Delrue @ 2015-06-25 10:44 UTC (permalink / raw)
  To: guix-devel

Hello!

I am still working on the GnuNet bindings: it’s been a much harder and
longer work than I thought, but the trickiest parts are done.

The main data structures (URIs, configuration handles, metadata…) have
been bound and tested, the scheduler has also be bound. Moreover, the
dependency on GOOPS as well as the need of separated C library have been
completely removed.

Code for the bindings are available on the Savannah repository:

    http://git.savannah.gnu.org/cgit/guix/gnunet.git/tree/

You’ll find, in the file `examples/search.scm`, a loose clone of the
`gnunet-search` utility that shows the (uncomplete) API.

These next days, I’ll complete the bindings (upload & download, more
metadata, some syntactic sugar if needed) and start designing the next
step: how to share packages through GnuNet.

Testing the bindings
————————————————————

You’ll need a working GnuNet installation. For instance, let’s set up
a local GnuNet peer:

    $ guix package -i gnunet
    $ mkdir ~/.peer
    $ touch ~/.peer/peer.conf

Now, edit `peer.conf` and insert this content:

--8<---------------cut here---------------start------------->8---
[PATHS]
GNUNET_HOME = "/home/remi/.gnunet/"
--8<---------------cut here---------------end--------------->8---

We can now start our peer; beware, this next command will continuously
send output to your terminal:

    $ gnunet-arm -c ~/.peer/peer.conf -s

We can publish files on our local peer using `gnunet-publish`, find
them with `gnunet-search` and retrieve them `gnunet-download`. Now
let’s publish a fake file and search it using the Guile clone of
`gnunet-search`:

    $ export LD_LIBRARY_PATH="~/.guix-profile/lib/"
    $ echo "hi gnunet!" > foo.txt
    $ gnunet-publish foo.txt
    $ git clone git://git.savannah.gnu.org/guix/gnunet.git
    $ cd gnunet/
    $ examples/search.scm "foo"

That last line will start a search on the keyword "foo" for 5
seconds. You should normally get an output resembling this:

    gnunet-download -o "foo.txt" gnunet://fs/chk/M976V69FDSQDH7…

Running this command will retrieve the "foo.txt" file:

    $ gnunet-download -o "foo.txt" gnunet://fs/chk/M976V69FDSQD…
    100% [============================================================]
    Downloading `foo.txt' done (5 b/s).
    $ cat foo.txt
    hi gnunet!

  ————

As usual, if you have any question, do not hesitate to contact me
through email or IRC (remi`bd).

Good afternoon,
-- 
Rémi Birot-Delrue

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: GSoC: Binary package distribution through GnuNet (report 2)
  2015-06-25 10:44 GSoC: Binary package distribution through GnuNet (report 2) Rémi Birot-Delrue
@ 2015-06-25 20:15 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-06-25 20:15 UTC (permalink / raw)
  To: Rémi Birot-Delrue; +Cc: guix-devel, gnunet-developers

Hello!

(+ Cc: gnunet-developers.)

I’m happy to report that examples/search.scm works for me as advertised.
I was even able to find a copy of the GPL and gnunet-c-tutorial.pdf.
:-)

The tests pass, except for progress-info.scm:

--8<---------------cut here---------------start------------->8---
$ ./run-tests.scm 
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /data/src/guix-gnunet/./run-tests.scm
;;; compiled /home/ludo/.cache/guile/ccache/2.0-LE-8-2.0/data/src/guix-gnunet/run-tests.scm.go
;;; compiling /data/src/guix-gnunet/tests/binding-utils.scm
;;; compiled /home/ludo/.cache/guile/ccache/2.0-LE-8-2.0/data/src/guix-gnunet/tests/binding-utils.scm.go
%%%% Starting test test-binding-utils  (Writing full log to "test-binding-utils.log")
# of expected passes      7
;;; compiling /data/src/guix-gnunet/tests/configuration.scm
;;; compiled /home/ludo/.cache/guile/ccache/2.0-LE-8-2.0/data/src/guix-gnunet/tests/configuration.scm.go
%%%% Starting test test-configuration  (Writing full log to "test-configuration.log")
# of expected passes      9
;;; compiling /data/src/guix-gnunet/tests/container-metadata.scm
;;; compiled /home/ludo/.cache/guile/ccache/2.0-LE-8-2.0/data/src/guix-gnunet/tests/container-metadata.scm.go
%%%% Starting test test-container-metadata  (Writing full log to "test-container-metadata.log")
# of expected passes      12
;;; compiling /data/src/guix-gnunet/tests/progress-info.scm
;;; WARNING: compilation of /data/src/guix-gnunet/tests/progress-info.scm failed:
;;; ERROR: Syntax error:
;;; /data/src/guix-gnunet/tests/progress-info.scm:41:0: source expression failed to match any pattern in form (%test-error (quote invalid-arg) (integer->progress-info-status 42))
%%%% Starting test test-fs-progress-info  (Writing full log to "test-fs-progress-info.log")
ice-9/psyntax.scm:1422:32: In procedure expand-macro:
ice-9/psyntax.scm:1422:32: Syntax error:
/data/src/guix-gnunet/tests/progress-info.scm:41:0: source expression failed to match any pattern in form (%test-error (quote invalid-arg) (integer->progress-info-status 42))

Some deprecated features have been used.  Set the environment
variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
program to get more information.  Set it to "no" to suppress
this message.
--8<---------------cut here---------------end--------------->8---

The implementation looks good to me.  There are a few things that could
be made nicer with some macrology, such as the big ‘make-struct’ in
‘%gnunet-fs-start’ and the structure definitions in that file, but it’s
not necessary to spend time on this now.

Since it uses the FFI, it’s important to have good test coverage because
there’s no compiler to flag API mismatches, but that seems to be mostly
OK already.

Throwing some autotools in there for good measure would be nice; as
discussed on IRC, you could simply copy and adjust configure.ac,
Makefile.am, and pre-inst-env.in from guix/dhcp.git.  I’m happy to help
on that if needed.

What are your plans for the next steps now?  I suppose we are targeting
the FS service, right?

Thanks!

Ludo’.

_______________________________________________
GNUnet-developers mailing list
GNUnet-developers@gnu.org
https://lists.gnu.org/mailman/listinfo/gnunet-developers

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-25 20:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-25 10:44 GSoC: Binary package distribution through GnuNet (report 2) Rémi Birot-Delrue
2015-06-25 20:15 ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.