guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GSoC: Binary package distribution through GnuNet (report 2)


From: Rémi Birot-Delrue
Subject: GSoC: Binary package distribution through GnuNet (report 2)
Date: Thu, 25 Jun 2015 12:44:28 +0200

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]